import { AsyncData } from 'nuxt/dist/app/composables';

export default async function useAsyncDataNextTick(
  asyncData: AsyncData<unknown, Error | null>,
) {
  // if (asyncData.pending) {
  // await new Promise((resolve, reject) => {
  //   watchOnce(() => asyncData.pending, resolve);
  // });
  // }
  await until(asyncData.pending).toBe(false);
}
